package com.wbs.rest.config;

import com.wbs.rest.resource.SqlResourceInformationHandlerMethodArgumentResolver;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;
import java.util.List;

@Configuration
public class SqlWebMvcConfiguration implements WebMvcConfigurer {

    @Resource
    SqlRestContext sqlRestContext;

    @Override
    public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
        argumentResolvers.add(new SqlResourceInformationHandlerMethodArgumentResolver(sqlRestContext));
    }


}
